﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using BlueLotus7.ArchiveSystem.Common;

namespace BlueLotus7.ArchiveSystem.Interfaces
{
    [ServiceContract]
    public interface IArchiveSystemCommonService
    {
        #region Domain Scope

        [OperationContract]
        Guid? AddOrUpdateDomainScope(DomainScope domainScope);

        [OperationContract]
        List<DomainScope> QueryDomainScopeList(DomainScopeType? domainScopeType, string keywords);

        [OperationContract]
        DomainScope GetDomainScopeByKey(Guid key);

        [OperationContract]
        DomainScope GetDomainScopeByCode(string code);

        #endregion

        #region Domain Scope User

        [OperationContract]

        Guid? AddOrUpdateScopeUser(DomainScopeUser user);

        [OperationContract]

        List<DomainScopeUser> QueryDomainScopeUsers(Guid? scopeKey, string identityKeyword);

        [OperationContract]

        DomainScopeUser GetDomainScopeUserByKey(Guid key);

        #endregion

        #region MonitorClient

        [OperationContract]
        List<MonitorClient> GetMonitorClients();

        [OperationContract]
        MonitorClient GetMonitorClientByKey(Guid monitorClientKey);

        [OperationContract]
        Guid? AddMonitorClient(MonitorClient client);

        [OperationContract]
        bool UpdateMonitorClient(MonitorClient client);

        [OperationContract]
        List<ClientHeartbeat> QueryClientHearbeat(Guid? clientKey, int topCount);

        [OperationContract]
        bool CreateClientHeartbeat(Guid clientKey, DateTime lastSettingStamp);

        #endregion

        #region MonitoTask

        [OperationContract]
        Guid? AddOrUpdateMonitorTask(MonitorTask task);

        [OperationContract]
        List<ReportableTask> GetMonitorTaskByClientKey(Guid clientKey, bool includeDisabled);

        [OperationContract]
        ReportableTask GetMonitorTaskByKey(Guid key);

        [OperationContract]
        List<ReportableTask> QueryMonitorTasks(string name, Guid? clientKey, MonitorTask.TaskExecutionType? executionType, string thirdPartyIdentity, bool? isNightOperationOnly, bool? isDisabled);

        #endregion

        #region Utility



        #endregion
    }
}
